<?php /* @var $this Controller */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />

	<!-- blueprint CSS framework -->
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
	<!--[if lt IE 8]>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
	<![endif]-->

	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />
<!--	<link rel="stylesheet" type="text/css" href="<?php // echo Yii::app()->request->baseUrl; ?>/css/form.css" />-->
<!--	<link rel="stylesheet" type="text/css" href="<?php // echo Yii::app()->request->baseUrl; ?>/css/bootstrap.min.css" />-->

	<title><?php // echo CHtml::encode($this->pageTitle); ?></title>
</head>

<body>

<div class="container" id="page">

	<div id="header">
		<div id="logo_wraper">
			<a href="<?php echo $this->createUrl('/cm/cmContact/admin')?>">
				<div id="logo"></div>
				<div id="title">Contact Manager</div>
			</a>
		</div>
            <div id="menu">
                <?php $this->widget('zii.widgets.CMenu',array(
//                        'itemCssClass' => 'menu_button',
                        'linkLabelWrapperHtmlOptions' => array('class' => 'home_button'),
                        'encodeLabel' => false,
			'items'=>array(
				array('label'=>'Home', 'url'=>array('/site/index'), 'template' => '<span class="home_button">{menu}</span>', 'itemOptions' => array('class' => 'menu_button')),
//				array('label'=>'Send', 'url'=>array('/cm/cmContact/send'), 'visible'=>Yii::app()->user->name == 'admin'),
				array('label'=>'CM', 'url'=>array('/cm/cmContact/admin'), 'visible'=>Yii::app()->user->name == 'admin', 'itemOptions' => array('class' => 'menu_button')),
				array('label'=>'Authorization', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest, 'template' => '<span class="auth_button">{menu}</span>', 'itemOptions' => array('class' => 'menu_button')),
				array('label'=>'Registration', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest, 'template' => '<span class="reg_button">{menu}</span>', 'itemOptions' => array('class' => 'menu_button')),
				array('label'=>'Logged as <span class="bold">' . Yii::app()->user->name . '</span>', 'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'Logoff', 'url'=>array('/site/logout'), 'template' => '<span class="logout_button">{menu}</span>', 'linkOptions' => array('class' => 'under_link'), 'visible'=>!Yii::app()->user->isGuest)
			),
		)); ?>
            </div>
	</div><!-- header -->
        <div class="clear"></div>
	<div id="mainmenu">

	</div><!-- mainmenu -->
	<?php if(isset($this->breadcrumbs)):?>
		<?php // $this->widget('zii.widgets.CBreadcrumbs', array('links'=>$this->breadcrumbs,)); ?><!-- breadcrumbs -->
	<?php endif?>

	<?php echo $content; ?>

	<div class="clear"></div>

	<div id="footer">
		&copy;<?php echo date('Y') ?> Wise Engineering
	</div><!-- footer -->

</div><!-- page -->

</body>
</html>
